<style>
.headinfo .child.userinfo .face {
    border: 0.1rem solid #fff; 
}
</style>
<div class='fui-page fui-page-current' ng-if="pagedata.op=='main'">
    <div class="fui-header">
		<div class="fui-header-left" onclick="window.history.go(-1);">
            <a class="back"></a>
        </div>
		<div class="title">会员中心</div>
		<div class="fui-header-right"></div>
	</div>
	<div class='fui-content member-page' style="top:0">
		<div style="background-image:url('../addons/jy_kecheng/resource/images/top-bg.png');">
			<div class="headinfo" style="background-color:red;filter:Alpha(opacity=50);opacity:0.8;">
				<a class="setbtn" href="javascript:;" ng-click="access_json('set/')"><i class="fa fa-cog"></i></a>
				<div class="child">
					<div class="title">余额</div>
					<div class="num">{{pagedata.member.credit2 || '0.00'}}</div>
					<a href="javascript:;" ng-click="access_json('core/member.recharge/')"><div class="btn">充值</div></a>
				</div>
				<div class="child userinfo">
					<a href="javascript:;" ng-click="access_json('/cavatar/')" style="color: white;">
						<div class="face">
							<img ng-src="{{tomedia(pagedata.user.avatar) || '../core/resource/images/gw-user.png'}}" />
							<span class="vip" ng-if="pagedata.user.isvip==1 && pagedata.user.vipstatus ==1"><i class="icon jinyunicon icon-vip5" style="font-size:0.5rem;padding-left:0.1rem"></i></span>
							<span class="vip" style="background: #999 none repeat scroll 0 0;" ng-if="pagedata.user.isvip==1 && pagedata.user.vipstatus ==2"><i class="icon jinyunicon icon-vip5" style="font-size:0.5rem;padding-left:0.1rem"></i></span>
						</div>
						<div class="name">{{pagedata.user.nickname}}</div>
					</a>
					<div class="level" ng-if="pagedata.pluginset.no_vip !=1 && pagedata.user.isvip==1 && pagedata.user.vipstatus ==1" href="javascript:;" ng-click="access_json('jy_kecheng/home/buyvip/')">
						VIP到期时间:{{pagedata.user.viptime}} <span class="btn" style="padding:0.13rem 0.2rem;font-size:0.5rem;line-height:0.5rem;height:0.8rem;margin-top:-0.1rem"> 续费VIP</span>
					</div>
					<div class="level" ng-if="pagedata.pluginset.no_vip !=1 && pagedata.user.isvip==1 && pagedata.user.vipstatus ==2" href="javascript:;" ng-click="access_json('jy_kecheng/home/buyvip/')">
						VIP已过期 <span class="btn"  style="padding:0.13rem 0.2rem;font-size:0.5rem;line-height:0.5rem;height:0.8rem;margin-top:-0.1rem">续费VIP</span>
					</div>
					<div class="level" ng-if="pagedata.pluginset.no_vip !=1 && pagedata.user.isvip==0" href="javascript:;" ng-click="access_json('jy_kecheng/home/buyvip/')">
						<span class="btn" style="padding:0.13rem 0.2rem;font-size:0.5rem;line-height:0.5rem;height:0.8rem;margin-top:-0.1rem">购买VIP</span>
					</div>
				</div>
				<div class="child">
					<div class="title">获得红包(所有)</div>
					<div class="num">{{pagedata.allred || '0.00'}}</div>
					<a href="javascript:;" ng-click="access_json('jy_kecheng/home/tixian/')" class="external"><div class="btn">提现</div></a>
				</div>
				<div class="water">
					<div class="water-1"></div>
					<div class="water-2"></div>
				</div>
			</div>
		</div>
		
		<div class="fui-icon-group noborder col-4" style="background-color: #f7f7f7;">
						<div  class="fui-icon-col external" href="javascript:;" ng-click="access_json('jy_kecheng/myfollow/')">
							<div class="badge"></div>
							<div class="icon icon-green radius"><i class="icon jinyunicon icon-follow"></i></div>
							<div class="text">我的关注</div>
						</div>
						<div class="fui-icon-col external" href="javascript:;" ng-click="access_json('jy_kecheng/myfollow/fans/')">
							<div class="badge"></div>
							<div class="icon icon-green radius"><i class="icon jinyunicon icon-xiai"></i></div>
							<div class="text">我的粉丝</div>
						</div>
						<div class="fui-icon-col external" href="javascript:;" ng-click="access_json('jy_kecheng/myshoucang/')">
							<div class="badge"></div>
							<div class="icon icon-green radius"><i class="icon jinyunicon icon-chakan"></i></div>
							<div class="text">我的收藏</div>
						</div>
						<div class="fui-icon-col external" href="javascript:;" ng-click="access_json('jy_kecheng/myzuji/')">
							<div class="badge"></div>
							<div class="icon icon-green radius"><i class="icon jinyunicon icon-zuji"></i></div>
							<div class="text">我的足迹</div>
						</div>
		</div>
		<div class="weui_btn_area" style="margin-top:0;">
			 <a class="weui_btn weui_btn_primary" href="javascript:" ng-click="access_json('jy_kecheng/myvideo/edit/')">发布课程</a>
		</div>
		<div style="padding:0.5rem">
		<div ng-if="pagedata.jy_commission" class="fui-cell-group" style="margin-top:0">
			<a href="javascript:;" ng-click="access_json('jy_commission/index/')" class="fui-cell">
				<div class="fui-cell-icon ">
					<i class="icon jinyunicon icon-erweima text-yellow"></i>
				</div>
				<div class="fui-cell-text">分销中心</div>
				<div class="fui-cell-remark" style="font-size: 0.5rem;"></div>
			</a>
		</div>
		<div ng-if="pagedata.isadmin ==1" class="fui-cell-group fui-cell-click">
				<a class="fui-cell"  href="javascript:;" ng-click="access_json('jy_kecheng/home/viplog/')">
					<div class="fui-cell-icon"><i class="icon jinyunicon icon-success"></i></div>
					<div class="fui-cell-text"><p>VIP购买记录</p></div>
					<div class="fui-cell-remark"></div>
				</a>
		</div>
		<div ng-if="pagedata.show_sh ==1" class="fui-cell-group fui-cell-click ">
				<a class="fui-cell"  href="javascript:;" ng-click="access_json('jy_kecheng/shenhe/')">
					<div ng-if="pagedata.shenhenums>0" class="badge">{{pagedata.shenhenums}}</div>
					<div class="fui-cell-icon"><i class="icon jinyunicon icon-success"></i></div>
					<div class="fui-cell-text"><p>审核课程</p></div>
					<div class="fui-cell-remark"></div>
				</a>
		</div>
		<div class="fui-cell-group fui-cell-click ">
				<a class="fui-cell"  href="javascript:;" ng-click="access_json('jy_kecheng/userlist/')">
					<div class="fui-cell-icon"><i class="icon jinyunicon icon-wo1"></i></div>
					<div class="fui-cell-text"><p>查看学友</p></div>
					<div class="fui-cell-remark"></div>
				</a>
		</div>
		<div class="fui-icon-group noborder col-3" style="background-color: #fff;">
						<div class="fui-icon-col external" href="javascript:;" ng-click="access_json('jy_kecheng/myvideo/')">
							<div class="badge"></div>
							<div class="icon icon-green radius"><i class="icon jinyunicon icon-liebiao"></i></div>
							<div class="text">我发布的</div>
						</div>
						<div class="fui-icon-col external" href="javascript:;" ng-click="access_json('jy_kecheng/mybuy/')">
							<div class="badge"></div>
							<div class="icon icon-green radius"><i class="icon jinyunicon icon-liebiao"></i></div>
							<div class="text">我购买的</div>
						</div>
						<div class="fui-icon-col external"  href="javascript:;" ng-click="access_json('jy_kecheng/home/sred')">
							<div class="badge"></div>
							<div class="icon icon-green radius"><i class="icon jinyunicon icon-tuikuan"></i></div>
							<div class="text">收到的红包</div>
						</div>
						<div class="fui-icon-col external"  href="javascript:;" ng-click="access_json('jy_kecheng/home/fred')">
							<div class="badge"></div>
							<div class="icon icon-green radius"><i class="icon jinyunicon icon-tuikuan"></i></div>
							<div class="text">发出的红包</div>
						</div>
						<div class="fui-icon-col external"  href="javascript:;" ng-click="access_json('jy_kecheng/home/cashrecord')">
							<div class="badge"></div>
							<div class="icon icon-green radius"><i class="icon jinyunicon icon-wodezichan"></i></div>
							<div class="text">提现记录</div>
						</div>
						
		</div>
		</div>
		<div class="footer" style="width:100%; margin-top:0.5rem;margin-bottom:1rem;display: block;font-size:0.5rem;text-align:center">
			Copyright © {{pagedata.account.cname}} 2018-2023
		</div>
	</div>
</div>
<div class='fui-page fui-page-current' ng-if="pagedata.op=='set'">
	<div class="fui-header">
			<div class="fui-header-left" onclick="window.history.go(-1);">
				<a class="back"></a>
			</div>
			<div class="title">个人设置</div>
			<div class="fui-header-right"></div>
	</div>
	<div class="fui-list-group merchgroup" ng-click="access_json('jy_kecheng/home/set')" style="margin-top:58px">
					<div class="fui-list jump">
						<a class="fui-list-media" ng-if="pagedata.item.logo">
							<img class="round" src="{{tomedia(pagedata.item.logo) || '../core/resource/images/nopic.jpg'}}" />
						</a>
						<a class="fui-list-media weui_uploader_input_wrp" ng-if="!pagedata.item.logo" >
							<input class="weui_uploader_input" ng-click="up_file(pagedata.item,'logo','image')" accept="image/jpg,image/jpeg,image/png,image/gif" multiple="">
						</a>
					</div>
	</div>
	<div class="weui_cells weui_cells_form">
				  <div class="weui_cell weui_vcode">
					<div class="weui_cell_hd"><label class="weui_label">昵称</label></div>
					<div class="weui_cell_bd weui_cell_primary">
						<input class="weui_input" type="text" ng-model="pagedata.item.nickname" placeholder="请输入您的昵称">
					</div>
				</div>
				<div class="weui_cell weui_vcode">
					<div class="weui_cell_hd"><label class="weui_label">手机</label></div>
					<div class="weui_cell_bd weui_cell_primary">
						<input class="weui_input" type="text" ng-model="pagedata.item.mobile" placeholder="请输入您的手机号码">
					</div>
				</div>
				<div class="weui_cell weui_vcode">
					<div class="weui_cell_hd"><label class="weui_label">手机</label></div>
					<div class="weui_cell_bd weui_cell_primary">
						<input class="weui_input" type="text" ng-model="pagedata.item.mobile" placeholder="请输入您的手机号码">
					</div>
				</div>
	</div>
	<div class="weui_btn_area">
			 <a class="weui_btn weui_btn_primary" href="javascript:" id="showTooltips" ng-click="post(pagedata.item,'set')">提交</a>
	</div>
</div>
<div class='fui-page fui-page-current' ng-if="pagedata.op=='buyvip'">
<div class="fui-content">
		<div class="fui-picture">
				<a style="display: block; padding: {paddingtop}px {paddingleft}px;" data-nocache="true">
					<img ng-src="{{tomedia(pagedata.vipbg) || '../core/resource/images/nopic.jpg'}}">
				</a>
		</div>
		<div class="fui-cell-group fui-cell-click" style="padding-bottom:0.3rem">
			<div class="fui-cell sm">
				<div class="fui-cell-label" style='width:auto' >付费方式</div>
				<div class="fui-cell-text"> <span ng-click="pagedata.type(1);" ng-class="{'jylabel jylabel-red':1,'active':pagedata.post.paytype==1}" style="margin-right:10px">按月支付</span><span ng-click="pagedata.type(2);" ng-class="{'jylabel jylabel-red':1,'active':pagedata.post.paytype==2}" style="margin-right:10px">按季支付</span><span ng-click="pagedata.type(3);" ng-class="{'jylabel jylabel-red':1,'active':pagedata.post.paytype==3}">按年支付</span></div>
			</div>
			<div class="fui-cell sm">
				<div class="fui-cell-label" style='width:auto' >开通时长</div>
				<div class="fui-cell-mask noremark" style="margin-right:10px">
					 <div class="fui-number">
						<div class="minus" ng-click="pagedata.minus(pagedata.post.paytype)">-</div>
						<input class="num" type="tel" name="" value="{{pagedata.post.num}}" readonly="readonly"/>
						<div class="plus" ng-click="pagedata.plus(pagedata.post.paytype)">+</div>
					</div>
				</div>
				<div ng-if="pagedata.post.paytype==1" class="fui-cell-text">个月</div><div ng-if="pagedata.post.paytype==2"  class="fui-cell-text" >个季度</div><div ng-if="pagedata.post.paytype==3" class="fui-cell-text">年</div>
			</div>
			<div class="fui-cell sm">
				<div class="fui-cell-label" style='width:auto' >费用合计：</div>
				<div class="fui-cell-text bold" style="color:red"> ￥{{pagedata.fee || '0.00'}} <span class="delete">原价:￥{{pagedata.fee0}}</span></div>
			</div>
			</div>
		<div class="weui_cells_checkbox" style="margin-top:2rem">
                <div class="fui-cell-label" style="text-align:center;margin:0 auto;padding:0.2rem">
                    <input type="checkbox" class="fui fui-checkbox fui-checkbox-danger verify-checkbox" style="line-height:0.6rem" ng-checked="pagedata.post.checked==true" ng-model="pagedata.post.checked">
					我已阅读并同意《<a onclick="$('#showsystemcontent').modal();" style="color:f60">会员协议</a>》
                </div>
        </div>
		<div class="weui_btn_area" style="margin-top:0">
			 <a class="weui_btn weui_btn_primary" href="javascript:" id="showTooltips" ng-click="pagedata.buyvip();">提交</a>
		</div>
</div>
<div id="showsystemcontent" class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
<div class="modal-dialog" style="width:96%;left:2%;top:1.5%;">
<div class="modal-content" style="min-height:500px">
	<div aria-hidden="true" data-dismiss="modal" class="closebtn" style="right:10px;top:0"><i class="icon jinyunicon icon-wrong" style="color:#ccc;"></i></div>
	<div class="fui-article-page">
			<div class="fui-article-title" style="text-align:center">平台声明</div>
			<div class="fui-article-content" ng-bind-html="trust(pagedata.pluginset.systemcontent)"></div>
	</div>
</div>
</div>
</div>
<script type="text/javascript">
//购买
scope.pagedata.buyvip=function(){
	if(!scope.pagedata.post.checked){
		scope.message('请先阅读并勾选《会员协议》','error');
		return false;
	}
	var params={
		data:{'num':scope.pagedata.post.num,'paytype':scope.pagedata.post.paytype},
		op:'buyvip',
		callback:function(res){
			if(res.payid){
				require(['tool'],function(tool){
					tool.pay(res.payid,function(res){
						if(res.type=='success'){
							scope.message('支付成功！','','home/');
							
						}else{
							scope.message('支付失败！失败原因：'+res.message,'error');
						}
					});
				});
			}
		}
	};
	scope.post_json(params);
	return
}
//减少
scope.pagedata.minus=function(type){
	if(scope.pagedata.post.num <=1){
		return false;
	}
	scope.pagedata.post.num--;
	scope.pagedata.jisuan(type,scope.pagedata.post.num);
	return
}
//增加
scope.pagedata.plus=function(type){
	scope.pagedata.post.num++;
	scope.pagedata.jisuan(type,scope.pagedata.post.num);
	return
}
//选择付款类型
scope.pagedata.type=function(type){
	scope.pagedata.post.num=1
	scope.pagedata.post.paytype = type;
	scope.pagedata.jisuan(type,scope.pagedata.post.num);
	return
}
//计算
scope.pagedata.jisuan=function(type,num){
	if(type ==1){
		scope.pagedata.fee = getprice(scope.pagedata.pluginset.mfee * num)
		if(scope.pagedata.pluginset.mfee0){
			scope.pagedata.fee0 = getprice(scope.pagedata.pluginset.mfee0 * num)
		}else{
			scope.pagedata.fee0 = getprice(scope.pagedata.pluginset.mfee * 1.5 * num)
		}
	}else if(type ==2){
		scope.pagedata.fee = getprice(scope.pagedata.pluginset.jfee * num)
		if(scope.pagedata.pluginset.jfee0){
			scope.pagedata.fee0 = getprice(scope.pagedata.pluginset.jfee0 * num)
		}else{
			scope.pagedata.fee0 = getprice(scope.pagedata.pluginset.jfee * 1.5 * num)
		}
		
	}else if(type ==3){
		scope.pagedata.fee = getprice(scope.pagedata.pluginset.yfee * num)
		if(scope.pagedata.pluginset.yfee0){
			scope.pagedata.fee0 = getprice(scope.pagedata.pluginset.yfee0 * num)
		}else{
			scope.pagedata.fee0 = getprice(scope.pagedata.pluginset.yfee * 1.5 * num)
		}
	}
	scope.$evalAsync();
}
function getprice(num)
{
	//var num = parseFloat(num);
	num = num.toFixed(2);
	//console.log(num);
	return num
	
}
</script>
</div>
<div class='fui-page fui-page-current' ng-if="pagedata.op=='tixian'">
<div class="fui-content">
			<div class="weui_cells weui_cells_form">
            <div class="weui_cell">
                <div class="weui_cell_hd"><label class="weui_label">可提现金额</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="text" placeholder="{{pagedata.user.cash}}元" readonly>
                </div>
            </div>
        </div>
		<div class="weui_cells weui_cells_form">
            <div class="weui_cell">
                <div class="weui_cell_hd"><label class="weui_label">提现金额</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="number" placeholder="0.00" ng-model="pagedata.post.money">
                </div>
            </div>
        </div>
		<div class="weui_btn_area">
			 <a class="weui_btn weui_btn_primary" href="javascript:" id="showTooltips" ng-click="post(pagedata.post,'tixian')">提交</a>
		</div>
</div>
</div>
<div class='fui-page fui-page-current' ng-if="pagedata.op=='fred'">
<div class="fui-content" style="margin-bottom:4.8rem">
	<div class="clearfix table-responsive">
		<!-- ngIf: ''!='' -->
		<table class="table jinyun-table table-hover vertical-middle jinyun-form">
			<thead class="navbar-inner">
				<tr>
					<th>收红包用户</th>
					<th>作品</th>
					<th>金额</th>
					<th>状态</th>
					<th>时间</th>
				</tr>
			</thead>
				<tbody>
					<tr ng-repeat="item in pagedata.list" class="ng-scope">
						<td class="text-left">{{item.suser.nickname}}</td>
						<td class="text-left overflow-h" style="max-width:5rem">{{item.opus.title}}</td>
						<td class="text-left">{{item.fee}}元</td>
						<td class="text-right">{{item.ispay}}</td>
						<td class="text-right">{{item.createtime}}</td>
					</tr>
					<tr ng-if="pagedata.list.length <=0" style="text-align:center"><td colspan="5">暂时无数据</td></tr>
				</tbody>
		</table>
	</div>
</div>
</div>
<div class='fui-page fui-page-current' ng-if="pagedata.op=='sred'">
<div class="fui-content" style="margin-bottom:4.8rem">
	<div class="clearfix table-responsive">
		<!-- ngIf: ''!='' -->
		<table class="table jinyun-table table-hover vertical-middle jinyun-form">
			<thead class="navbar-inner">
				<tr>
					<th>发红包用户</th>
					<th>作品</th>
					<th>金额</th>
					<th>状态</th>
					<th>时间</th>
				</tr>
			</thead>
				<tbody>
					<tr ng-repeat="item in pagedata.list" class="ng-scope">
						<td class="text-left">{{item.fuser.nickname}}</td>
						<td class="text-left overflow-h" style="max-width:5rem">{{item.opus.title}}</td>
						<td class="text-left">{{item.fee}}元</td>
						<td class="text-right">{{item.ispay}}</td>
						<td class="text-right">{{item.createtime}}</td>
				</tr>
				<tr ng-if="pagedata.list.length <=0" style="text-align:center"><td colspan="5">暂时无数据</td></tr>
			</tbody>
		</table>
	</div>
</div>
</div>
<div class='fui-page fui-page-current' ng-if="pagedata.op=='cashrecord'" style="margin-bottom:4.8rem">
<div class="fui-content" style="margin-bottom:4.8rem">
	<div class="clearfix table-responsive">
		<!-- ngIf: ''!='' -->
		<table class="table jinyun-table table-hover vertical-middle jinyun-form">
			<thead class="navbar-inner">
				<tr>
					<th>金额</th>
					<th>状态</th>
					<th>申请时间</th>
					<th>完成提现时间</th>
				</tr>
			</thead>
				<tbody>
					<tr ng-repeat="item in pagedata.list" class="ng-scope">
						<td class="text-left" ng-if="true">{{item.money}}</td>
						<td class="text-left" ng-if="true">{{item.status}}</td>
						<td class="text-left" ng-if="true">{{item.createtime}}</td>
						<td class="text-right" ng-if="true">{{item.overtime}}</td>
				</tr>
				<tr ng-if="pagedata.list.length <=0" style="text-align:center"><td colspan="4">暂时无数据</td></tr>
			</tbody>
		</table>
	</div>
</div>
</div>
<div class='fui-page fui-page-current' ng-if="pagedata.op=='viplog'">
<div class="fui-content" style="margin-bottom:4.8rem">
	<div class="clearfix table-responsive">
		<!-- ngIf: ''!='' -->
		<table class="table jinyun-table table-hover vertical-middle jinyun-form">
			<thead class="navbar-inner">
				<tr>
					<th>用户</th>
					<th>金额</th>
					<th>状态</th>
					<th>时间</th>
				</tr>
			</thead>
				<tbody>
					<tr ng-repeat="item in pagedata.list" class="ng-scope">
						<td class="text-left">{{item.nickname}}</td>
						<td class="text-left">{{item.fee}}元</td>
						<td class="text-right">{{item.ispay}}</td>
						<td class="text-right">{{item.createtime}}</td>
					</tr>
					<tr ng-if="pagedata.list.length <=0" style="text-align:center"><td colspan="5">暂时无数据</td></tr>
				</tbody>
		</table>
	</div>
</div>
</div>
<div ng-include="sys_html('_footer')"></div>
<script>
//信息弹窗：
if(scope.pagedata.op=="sred" || scope.pagedata.op=="fred"){
	setTimeout('checksms()',2000);
}
//信息弹窗：
//前端先注册以等待接收消息
require(['jinyun_socket'],function(jinyun_socket){
    jinyun_socket.connect();
    jinyun_socket.onsystem=function(res){
        if(res.message){
			var success_title = '确认';
			if(res.url){
				success_title = '前往查看';
			}
			scope.confirm({
						'message':res.message,
						'success':res.url,
						'success_title':success_title
			});
		}
    }
});
</script>